package Survey;

import java.io.Serializable;

import javax.swing.ImageIcon;

public class SurveyParameters implements Serializable{

	private static final long serialVersionUID = 1805551423335043555L;
	
	public static final int OPEN_ENDED = 0;
	public static final int SINGLE_CHOICE = 1;
	public static final int MULTIPLE_CHOICE = 2;
	public static final int HEIGHT = 0;
	public static final int WIDTH = 1;
	
	int index;
	
	//the actual question
	public String question;
	
	public ImageIcon picture;
	
	//the options for multiple choice questions ignored with open ended questions
	String[][] options;
	
	//what kind of question
	int type;
	
	int[] dimensions;
	boolean multipart;
	
	public SurveyParameters(int index){
		this.index = index;
		picture = null;
		question = "";
		options = null;
		type = OPEN_ENDED;
		dimensions = new int[]{1};
		multipart = false;
	}
	
	public SurveyParameters(int index, String question, ImageIcon picture, String[][] options, int type, 
							int[] dimensions, boolean multipart){
		this.index = index;
		this.question = question;
		this.picture = picture;
		this.options = options;
		this.type = type;
		this.dimensions = dimensions;
		this.multipart = multipart;
	}
	
	public String toString(){
		
		return "question: " + question + " type:" + type + " dimensions:" + dimensions[0] + (dimensions.length > 1?", "
		+ dimensions[1]:"") + " m:" + multipart;
	}
	
}
